<template>
  <h1 v-show="sum">当前求和结果{{ sum }}</h1>
  <br />
  <button @click="sum++">sum+1</button>
  <hr>
  <h1>当前鼠标坐标为:({{ point.x }},{{point.y}})</h1><br>
</template>

<script>
import { ref } from "vue";
import usePoint from '../hooks/usePoint';
export default {
  name: "Demo",
  setup() {
    // 数据
    let sum = ref(0);
    let point = usePoint()
    // 返回一个对象（常用）
    return {
      sum,
      point
    };
  },
};
</script>

<style>
</style>
